package hu.mapro.flang.gwt.war.client;

import hu.mapro.gwt.common.shared.Action;
import hu.mapro.gwtui.client.app.UserApplication;
import hu.mapro.gwtui.client.app.UserDesktop;

import com.google.gwt.core.client.GWT;

public class FlangApplication implements UserApplication {

	@Override
	public void launch(UserDesktop workspace) {
		FlangUserDesktop.setUserDesktop(workspace);
		
		ApplicationGinjector injector = GWT.create(ApplicationGinjector.class);
		Application application = injector.application();
		
		application.addLogouHandler(new Action() {
			@Override
			public void perform() {
				FlangUserDesktop.setUserDesktop(null);
			}
		});
	}

}
